<template>
	<view class="white">
		<u-navbar :is-back="false" :border-bottom="false" :background="{ background: '#fff' }">
			<view class="slot-wrap flex align-center">
				<text class="cuIcon-back" @click="Back"></text>
				课程介绍
			</view>
		</u-navbar>
		<view class="main">
			<view class="main-box">
				<view class="title u-flex justify-between">
				</view>
				<view class="">
					<view class="u-flex" @click="multiRedirect('/pages/details/details')">
						<!-- <image src="../../static/images/banren.png" mode="aspectFill"></image> -->
						<view class="u-flex-1">
							<view class="u-font-30 text-bold">
								二十四节气 冬至
							</view>
							<view class="u-font-24">
								带你走进中华墨坊
							</view>
						</view>
						<view class="cu-btn round bg-orange">
							查看
						</view>
					</view>
					<view class="u-flex" @click="multiRedirect('/pages/details/details')">
						<!-- <image src="../../static/images/banren.png" mode="aspectFill"></image> -->
						<view class="u-flex-1">
							<view class="u-font-30 text-bold">
								二十四节气 冬至
							</view>
							<view class="u-font-24">
								带你走进中华墨坊
							</view>
						</view>
						<view class="cu-btn round bg-orange">
							查看
						</view>
					</view>
					<view class="u-flex" @click="multiRedirect('/pages/details/details')">
						<!-- <image src="../../static/images/banren.png" mode="aspectFill"></image> -->
						<view class="u-flex-1">
							<view class="u-font-30 text-bold">
								二十四节气 冬至
							</view>
							<view class=" u-font-24">
								带你走进中华墨坊
							</view>
						</view>
						<view class="cu-btn round bg-orange">
							查看
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<view class="icon">
			<button class="cu-btn" open-type="contact" style="padding: 0;border-radius: 50%;">
				<image src="../../static/images/icon1.png" mode="aspectFill"></image>
			</button>
			<!-- <view class="">
				<image src="../../static/images/icon4.png" mode="aspectFill"></image>
			</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onLoad() {

		},
		methods: {
			Back(){
				uni.navigateBack({
				});
			},
			//页面跳转
			multiRedirect(url) {
				if (url && url.length > 0) {
					console.log('+++++', url.indexOf('http'))
					if (url.indexOf('http') === 0) {
						// #ifdef H5 
						location.href = url
						// #endif
						// #ifdef MP-WEIXIN
						uni.navigateTo({
							url: '/pages/web/web?url=' + encodeURIComponent(url)
						})
						// #endif
						// #ifdef APP-PLUS
						plus.runtime.openURL(url, function(res) {
							console.log(res);
						});
						// #endif
					} else if (url.indexOf('&switch') > -1) {
						url = url.substring(0, url.indexOf('&switch'))
						console.log(3434, url)
						uni.switchTab({
							url: url
						})
					} else {
						console.log("挑起", url)
						uni.navigateTo({
							url
						})
					}
				}
			},
		}
	}
</script>

<style lang="scss">
	.main{
		.main-box{
			.title{
				padding: 30rpx;
				.u-font-24{
					color: #999;
					margin-top: 0rpx;
				}
			}
		}
		.u-flex{
			padding: 0rpx 30rpx 35rpx;
			background-color: #FFFFFF;
			image{
				width: 230rpx;
				height: 140rpx;
				border-radius: 6rpx;
				margin-right: 16rpx;
			}
			.u-flex-1{
				height: 140rpx;
			}
			.u-font-30{
				color: #333;
				margin-right: 10rpx;
				overflow:hidden;
				text-overflow:ellipsis;
				display:-webkit-box;
				-webkit-box-orient:vertical;
				-webkit-line-clamp:2;
			}
			.u-font-24{
				color: #999;
				margin-top: 20rpx;
			}
			.cu-btn{
				font-size: 24rpx;
			}
		}
	}
	.icon{
		position: fixed;
		bottom: 80rpx;
		right: 30rpx;
		image{
			width: 100rpx;
			height: 100rpx;
			border-radius: 50%;
			margin-top: 25rpx;
			box-shadow: 0rpx 0rpx 10rpx #888888;
		}
		
	}
</style>
